<%@ page language="java" pageEncoding="UTF-8"%>
<link rel="stylesheet" href="jslib/kindeditor-4.1.10/themes/default/default.css" type="text/css"></link>
<script type="text/javascript" src="jslib/kindeditor-4.1.10/kindeditor-min.js"></script>
<script type="text/javascript" src="jslib/kindeditor-4.1.10/lang/zh_CN.js"></script>
<style type="text/css">
a {
	color: #5b5b5b /*颜色自定义*/;
	/*font-family: "楷体";
	font-size: 20px;*/
	text-decoration:none;
} /*未访问的链接,已访问的链接,点击激活链接*/

a:hover {
	color: #00f; /*颜色自定义*/
	text-decoration:none;
} /* 鼠标在链接上 */
</style>
<script type="text/javascript">
	$(function() {
		$('#forum_forumList_forumTree').tree({
			url : '${pageContext.request.contextPath}/treeAction!queryAllTreeNode.action?type=03',
			parentField : 'pid',
			lines : true,
			onClick:function(node){
				selectForumZoneId = node.id;
				closeTab({
					title : '帖子列表'
				});
				addTab({
					title : '帖子列表',
					closable : true,
					href : '${pageContext.request.contextPath}/pages/forum/invitationList.jsp',
				});
			}
		});

	});
	
	function openInvitation(thisId) {
		$.ajax({
			type : 'post',
			url : '${pageContext.request.contextPath}/invitationAction!queryInvitationAndReplyList.action',
			data : {
				id : thisId
			},
			dataType : 'json',
			success : function(r) {
				var dlg = $('<div style="padding:10px 20px;" />').dialog({
					width : 800,
					height : 600,
					href : '${pageContext.request.contextPath}/pages/forum/invitationReply.jsp',
					modal : true,
					title : '我要回帖',
					buttons : [ {
						text : '保存',
						handler : function() {
							$('#forum_invitationReply_replyInvitationForm').form('submit', {
								url : '${pageContext.request.contextPath}/invitationReplyAction!addInvitationReply.action',
								success : function(r) {
									var obj = jQuery.parseJSON(r);
									if (obj.success) {
										$.messager.show({
											title : '提示',
											msg : obj.msg
										});
										dlg.dialog('close');
									} else {
										$.messager.alert('提示', obj.msg);
									}
								}
							});
						}
					}, {
						text : '取消',
						handler : function() {
							dlg.dialog('close');
						}
					} ],
					onBeforeClose : function() {
						KindEditor.remove('textarea[name="content"]');
					},
					onClose : function() {
						$(this).dialog('destroy');
					},
					onLoad : function() {
						KindEditor.create('textarea[name="content"]', {
							resizeType : 1,
							allowPreviewEmoticons : false,
							allowImageUpload : false,
							items : [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'emoticons' ],
							afterBlur : function() {
								this.sync();
							}
						});
						$('#forum_invitationReply_replyInvitationForm input[name=invitationId]').val(thisId);
					}
				});
			}
		});
	}
	
	function openForumZone(thisId) {
		selectForumZoneId = thisId;
		closeTab({
			title : '帖子列表'
		});
		addTab({
			title : '帖子列表',
			closable : true,
			href : '${pageContext.request.contextPath}/pages/forum/invitationList.jsp',
		});
	}
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
	<div data-options="region:'west',border:false" style="width:180px; border-right-width: 1px;">
		<div class="easyui-panel" data-options="title:'论坛分区',fit:true,border:false" style="padding:5px 2px 2px 2px">
			<ul id="forum_forumList_forumTree"></ul>
		</div>
	</div>
	<div data-options="region:'center',border:false">
		<div class="easyui-layout" data-options="fit:true,border:false">
			<div data-options="region:'north',border:false" style="height:185px; border-bottom-width: 1px;">
				<div class="easyui-layout" data-options="fit:true,border:false">
					<div data-options="region:'west',border:false" style="width:300px; border-right-width: 1px;">
						<div class="easyui-panel" data-options="title:'我参与的帖子',fit:true,border:false" style="padding:5px 5px 0 5px">
							<jsp:include page="invitationMyList.jsp"></jsp:include>
						</div>
					</div>
					<div data-options="region:'center',border:false">
						<div class="easyui-panel" data-options="title:'论坛热贴',fit:true,border:false" style="padding:5px 5px 0 5px">
							<jsp:include page="invitationHotList.jsp"></jsp:include>
						</div>
					</div>
					<div data-options="region:'east',border:false" style="width:300px; border-left-width: 1px;">
						<div class="easyui-panel" data-options="title:'论坛新帖',fit:true,border:false" style="padding:5px 5px 0 5px">
							<jsp:include page="invitationNewList.jsp"></jsp:include>
						</div>
					</div>
				</div>
			</div>
			<div data-options="region:'center',border:false">
				<div class="easyui-panel" data-options="fit:true,border:false" style="padding:2px;">
					<jsp:include page="zoneList.jsp"></jsp:include>
				</div>
			</div>
		</div>
	</div>
</div>